<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html ;charset=utf-8">
    <meta name="google" content="notranslate" />
    <meta http-equiv="X-UA-COMPATIBLE" content="IE=edge"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>订单查询</title>
    <link rel="stylesheet" href="{{URL::asset('/ucenter/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{URL::asset('/ucenter/css/base.css')}}">
    <link rel="stylesheet" href="{{URL::asset('/admin/css/customercx.css')}}">
    <link rel="stylesheet" href="{{URL::asset('/admin/css/dingdancx.css')}}">
</head>
<body>
@include('admin.adminheader')
@include('admin.adminleft')
<div class="L_customerCX">
    <div class="L_cxCON">
        <div class="L_DD">
            <div class="L_search">
                <span>客户昵称</span>
                <input type="text" value="{{$username}}" placeholder="请输入分析师名称" id="input_name" maxlength="6">
                <span class="cxBtn" id="cxBtn_1">查询</span>
                <span style="margin-left: 70px;">订单查询</span>
                <input type="text" value="{{$tradeid}}" placeholder="请输入订单号" id="input_id" maxlength="10">
                <span class="cxBtn" id="cxBtn_2">查询</span>
            </div>
            <div class="L_ddTitle">
                <ul>
                    <li>昵称</li>
                    <li>订单号</li>
                    <li>品种</li>
                    <li>入场点位</li>
                    <li style="width:13%">下单时间</li>
                    <li>方向</li>
                    <li style='width:6%'>设置止盈</li>
                    <li style='width:6%'>设置止损</li>
                    <li style='width:7%'>平仓点位</li>
                    <li style="width:13%">平仓时间</li>
                    <li style='width:7%'>平仓类型</li>
                    <li>最终盈亏</li>
                </ul>
            </div>
            <div class="L_con">
                @if($data != '' && count($data)>0)
                    @foreach($data as $k=>$v)
                    <ul>
                        <li>{{$v->username}}</li>
                        <li>{{$v->tradeid}}</li>
                        <li>{{$v->typename}}</li>
                        <li>{{$v->begin_point}}</li>
                        <li style="width:13%">{{$v->begin_time}}</li>
                        <li>@if($v->buy_status==0) 买多 @else 买空 @endif</li>
                        <li style='width:6%'>{{$v->profit_point}}</li>
                        <li style='width:6%'>{{$v->loss_point}}</li>
                        <li style='width:7%'>{{$v->end_point}}</li>
                        <li style="width:13%">{{$v->end_time}}</li>
                        <li style='width:7%'>
                            @if($v->isstop==0)
                                @if($v->stop_status==0) 手动平仓 @else 扫损平仓 @endif
                            @endif
                        </li>
                        <li>{{$v->final_point}}</li>
                    </ul>
                    @endforeach
                    <!-- 分页 -->
                    @if($username != '')
                        <div class="L_page">
                           {{ $data->appends(['username' => $username])->links() }}
                        </div>
                    @endif
                @else
                    <div class="msg">{{$msg}}</div>
                @endif
                
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript" src="{{ URL::asset('public_js/jquery-1.8.3.min.js') }}"></script>
<script>
    $(function(){
        // 左侧边栏
        $('.j_sideNav > ul > li').eq(2).addClass('active').siblings('li').removeClass('active');
        // 搜名用户名查询按钮
        $('#cxBtn_1').click(function(){
            $('#input_id').val('');
            var input_name = $.trim($('#input_name').val());
            if(input_name == ''){
                alert('请输入用户名');
                return false;
            }else{
                window.location.href='{{url("/myadmin/dingdancx?username=")}}'+input_name;
            }
        })
        
        //订单号查询
        $('#cxBtn_2').click(function(){
            $('#input_name').val('');
            var input_id = $.trim($('#input_id').val());
            if(input_id == ''){
                alert('请输入订单号');
                return false;
            }else{
                window.location.href='{{url("/myadmin/dingdancx?tradeid=")}}'+input_id;
            }
        })
    })
</script>
